import os
from sys import stdin

stdstr = str = stdin.read()

readnum = list(map(int,stdstr.split()))
# print(readnum)
idx=0
def read()->int:
    global idx
    idx=idx+1
    return readnum[idx-1]

n=read()+1
ans=0
arr = [[0,0,0] for _ in range(n)]
arr[0][1]=1

for i in range(n):
    arr[i][1]=read()
    arr[i][2]=read()
    arr[i][0]=arr[i][1]*arr[i][2]
    
arr.sort(key=lambda a:a[0])
print(arr)
ans=1
s=1
for i in range(n-1):
    ans=max(ans,int(s/arr[i][2]))
    s*=arr[i][1]
ans=max(ans,int(s/arr[n-1][2]))
print(int(ans))